package view;

import javax.swing.JOptionPane;

import model.FileParser;
import model.State;

/**
 * Main starts everything.
 * @author Sarah George
 * @version 2012
 */
public class Main {

	/**
	 * runs init methods and kicks of the gui
	 * @param arguments Arguments are ignored in this program.
	 */
	public static void main(String[] the_args) {
		FileParser the_parser = new FileParser();
		the_parser.init("data.xml");
		State my_state = new State(the_parser);
		if (!my_state.validData()) {
			JOptionPane.showMessageDialog(null, "Invalid File/Data");
			System.exit(-1);
		}
		
		//CONFIRMED VALID DATA INITIATE LOGIN
		new LoginFrame(my_state).start();
		
//		if(my_state.loginValid()) {
//			new GUIView(my_state).start();
//		}

	}
}//End class Main.